/************************************************************************/
/*    Author: Scott Bevin                                               */
/************************************************************************/

#pragma once

#include <Ogre.h>

namespace XF
{
	class OgreRenderer
	{
	private:
		Ogre::Root *mRoot;
		Ogre::RenderWindow *mWindow;
		Ogre::SceneManager *mDefaultSceneMgr;
		Ogre::Camera *mDefaultCamera;
		Ogre::Viewport *mDefaultViewport;

		bool CreateRoot();
		void DefineResources(std::string resourceFile);
		bool CreateRendersystem();
		void CreateRenderWindow(std::string windowTitle);
		void CreateDefaultScene();

	public:
		OgreRenderer();
		~OgreRenderer();

		bool Initialize(std::string windowTitle, std::string resourceFile);
		void InitializeAllResources(int mipLevel);
		void ShutDown();

		Ogre::Root* GetRoot(){ return mRoot; }
		Ogre::RenderWindow* GetRenderWindow(){ return mWindow; }
		Ogre::SceneManager* GetDefaultSceneManager(){ return mDefaultSceneMgr;}
		Ogre::Camera* GetDefaultCamera(){return mDefaultCamera;}
		Ogre::Viewport* GetDefaultViewport(){return mDefaultViewport;}
	};
}
